package com.finger.forest.adapter;

import android.graphics.drawable.Drawable;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.finger.forest.R;

import java.util.List;
import java.util.Map;

/**
 * @author sy
 * @date 2021/1/20
 * @desc
 */
public class ConsultationAdapter extends BaseQuickAdapter<Map<String,Object>, BaseViewHolder> {
    public ConsultationAdapter(int layoutResId, @Nullable List<Map<String,Object>> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder viewHolder, Map<String,Object> item) {
        viewHolder.setImageDrawable(R.id.rivConsultation, this.mContext.getDrawable(Integer.parseInt(item.get("icon").toString())));
        viewHolder.setText(R.id.item_name, item.get("name").toString());

    }


}
